# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-flask-classful
_pkgname=flask_classful
pkgver=0.16.0
pkgrel=3
pkgdesc='Class based views for Flask.'
arch=('any')
url='https://pypi.org/project/Flask-Classful/#files'
license=('BSD')
depends=('python' 'python-flask')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('0781191193be1505e5884c3fe955cbc3e58dd136cb946c0ad5b0097ab98ddae907a608fa2a8c693f1ac5896af557ffdf844bfa9247899ce2e487f1ef22598678')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

	pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

